package com.friends.digitpic.service.dao;

import org.jeecgframework.minidao.annotation.Param;
import org.jeecgframework.minidao.annotation.ResultType;
import org.jeecgframework.minidao.annotation.Sql;
import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Repository;

import com.friends.digitpic.service.entity.PictypeEntity;

/**
 * 描述：图片类型
 * @author：jiangge xia
 * @since：2018年09月15日 22时44分21秒 星期六 
 * @version:1.0
 */
@Repository
public interface PictypeDao{

    /**
	 * 查询返回Java对象
	 * @param pictypeid
	 * @return
	 */
	@Sql("SELECT * FROM pictype WHERE pictypeid = :pictypeid")
	PictypeEntity get(@Param("pictypeid") String pictypeid);
	
	/**
	 * 修改数据
	 * @param pictype
	 * @return
	 */
	int update(@Param("pictype") PictypeEntity pictype);
	
	/**
	 * 插入数据
	 * @param pictype
	 */
	void insert(@Param("pictype") PictypeEntity pictype);
	
	/**
	 * 通用分页方法，支持（oracle、mysql、SqlServer、postgresql）
	 * @param pictype
	 * @param page
	 * @param rows
	 * @return
	 */
	@ResultType(PictypeEntity.class)
	public MiniDaoPage<PictypeEntity> getAll(@Param("pictype") PictypeEntity pictype,@Param("page")  int page,@Param("rows") int rows);
	
	@Sql("DELETE from pictype WHERE pictypeid = :pictype.pictypeid")
	public void delete(@Param("pictype") PictypeEntity pictype);
	
}

